#ifndef PRIORITYQUEUE_H
#define PRIORITYQUEUE_H

#include <iostream>
#include <vector>
#include "Key.h"
#include "Object.h"
//#define DEBUG

using std::endl;
using std::cin;
using std::cout;

  // has full heapsort in it, it's used in A* pathfinding
  // and for simplicity is located here( in cpp file )
template<class T>
class PriorityQueue {
    public:
        PriorityQueue()
        {}

        void insert( T data );
        T max();
        T extractMax();
    private:
        vector<Key<T> > queue;
};



template<class T>
void heapify( vector<T>& ar, int i, int N );

template<class T>
void Build_heap( vector<T>& ar, int N ) ;

template<class T>
void Heapsort( vector<T>& ar, int N );

template<class T>
int max( vector<T>& ar, int a, int b );

Priority assignKey( int& i );
Priority assignKey( Object* o );

#endif // PRIORITYQUEUE_H
